<?php

function sef_request_rewriteResult($tmpl, $url, $params = array()) {
    $ru = $GLOBALS[RC]->getRouter()->buildUrl($url, $params);
    $arr = App::getBusiness('sef/rewrite_flow_output')->run(array($url));
    return Soul_Loader::loadInstance('Soul_Request_Result_Redirect')->setUrl($arr[0]);
}

Soul_Request_Helper::registerFunction('rewriteResult', 'sef_request_rewriteResult');